package com.onlinelibrary.mapper;

import com.onlinelibrary.pojo.Book;
import com.onlinelibrary.pojo.BookType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface BookTypeMapper {

    @Select("select * from booktype where state=1")
    List<BookType> list();

    @Update("update booktype set bookNum=bookNum+1 where id=#{tid}")
    Integer upBookNum(Book book);

    Integer addType(BookType bookType);


    Integer deleteType(BookType bookType);
}
